import 'package:flutter/material.dart';

class CheckBoxWidget extends StatelessWidget {
  final bool checked;
  final Function(bool) onTap;

  const CheckBoxWidget({
    Key key,
    @required this.checked,
    @required this.onTap,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return InkWell(
      child: Container(
        padding: EdgeInsets.all(14),
        child: Image.asset(
          checked ? 'assets/images/cart/check_checked.png' : 'assets/images/cart/check_normal.png',
          width: 17,
        ),
      ),
      onTap: () => onTap(!checked),
    );
  }
}
